<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								外部单号：<input type="text" name="outOrderId"/>
							</li>
							<li>
								内部单号：<input type="text" name="orderNo"/>
							</li>
							<li>
								客户名称：<input type="text" name="client"/>
							</li>
							<li>
								商户账号：<input type="text" name="aerchantId"/>
							</li>
							<li>
								承兑商号：<input type="text" name="acceptId"/>
							</li>
							<li>
								代理账号：<input type="text" name="agentId"/>
							</li>
							<li>
								订单状态：<input type="text" name="inState"/>
							</li>
							<li class="select-time">
								<label>下单时间： </label>
								<input type="text" class="date-time-input" id="startCreateTime" placeholder="开始" name="params[beginCreateTime]"/>
								<span>-</span>
								<input type="text" class="date-time-input" id="endCreateTime" placeholder="结束" name="params[endCreateTime]"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
                <a class="btn btn-primary btn-edit disabled" onclick="$.operate.detail()" shiro:hasPermission="agent_order_detail">
                    <i class="fa fa-edit"></i> 详情
                </a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="agent_order_export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "agent/order";
        var modelName = "orderin";
        var payTypeDir = [[${@dict.getType('pay_type')}]];
        var logicType = "order_in";

        $(function() {
            var options = {
                url: prefix + "/list/"+logicType,
                detailUrl: prefix + "/"+modelName+"/"+logicType+"/{id}",
                exportUrl: prefix + "/export/"+logicType,
                modalName: "入金订单",
				search: false,
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'id', 
					title : '编号',
					visible: true,
                    sortable: true
				},
				{
					field : 'outOrderId', 
					title : '外部单号',
                    sortable: false
				},
				{
					field : 'orderNo', 
					title : '内部单号',
                    sortable: false
				},
                    {
                        field : 'payType',
                        title : '入金方式',
                        sortable: true,
                        formatter: function(value, row, index) {
                            return $.table.selectDictLabel(payTypeDir, value);
                        }
                    },
				{
					field : 'usdtNo', 
					title : '充值数量(TOKEN)',
                    sortable: false
				},
				{
					field : 'aerchantNum', 
					title : '商户入金(TOKEN)',
                    sortable: false
				},
				{
					field : 'plantFeeRate', 
					title : '平台手续费率',
                    sortable: false
				},
				{
					field : 'plantFee', 
					title : '平台手续费金额(TOKEN)',
                    sortable: false
				},
				{
					field : 'agentFeeRate', 
					title : '代理抽成比例',
                    sortable: false
				},
				{
					field : 'agentFee', 
					title : '代理抽成金额(TOKEN)',
                    sortable: false
				},
				{
					field : 'aerchantFee', 
					title : '商户收益(TOKEN)',
                    sortable: false
				},
				{
					field : 'objectionName',
					title : '提出异议用户',
                    sortable: false
				},
				{
					field : 'objectionCreateTime', 
					title : '提出异议时间',
                    sortable: false
				},
			]
            };
            $.table.init(options);
        });

    </script>
</body>
</html>